package net.hz.utils;

public class Constants {
	public static enum Files{
		FIREWALL_BYPASS("Firewall Bypass", 80, 7000),
		PASSWORD_BREAK("Password Break", 200, 12500),
		DECRYPTOR("Decryptor", 900, 40000),
		UNHIDE_FILES("Unhide Files", 100, 9000);
		
		private final String _name;
		private final int _cpu;
		private final int _mem;
		
		private Files(String name, int cpu, int memory) {
			_name = name;
			_cpu = cpu;
			_mem = memory;
		}
		
		public final String text() {
			return _name;
		}
		
		public final double cpuUsage(double version) {
			return (version / 0.1) * _cpu;
		}
		
		public final double memUsage(double version) {
			    return (version / 0.1) * _mem;
		}
	}
	
	public static enum GatewayServers{
		ONE("204832", "CapnCrunch's Ded #1"),
		TWO("214093", "CapnCrunch's Ded #2"),
		THREE("216357", "CapnCrunch's Ded #3"),
		FOUR("215771", "CapnCrunch's Ded #4");
		
		private final String _id;
		private final String _name;
		
		private GatewayServers(String id, String name) {
			_id = id;
			_name = name;
		}
		public final String id() {
			return _id;
		}
		
		public final String text() {
			return _name;
		}
	}
	
	public static enum MissionType {
		 DELETE(2, "Delete file", false),
		 DESTROY(4, "Search and Destroy", true);
		 
		 private final int _id;
		 private final String _name;
		 private final boolean _isFaction;
		 
		 private  MissionType (int id, String name, boolean isFaction) {
			_id=id;
			_name=name;
			_isFaction = isFaction;
		 }
		 
		 public final String text() {
			 return _name;
		 }
		 
		 public int id() {
			  return _id;
		 }
		 
		 public boolean isFaction() {
			 return _isFaction;
		 }
	}
	
	public static enum ButtonDetails {
		COMPLETE_DELETE_TASKS (1, "Complete Delete Tasks"), 
		DO_DELETE_MISSIONS (2, "Do Delete Missions"), 
		NEW_SERVER_MISSIONS (3, "Missions on New Servers"), 
		FIND_DELETE_MISSIONS (4, "Find Delete Missions"),
		PERFORM_EVENTS(5, "Perform Events");
		private final String _buttonText;
		private final int _buttonId;
		
		private ButtonDetails(int id, String val) { 
			_buttonText = val;
			_buttonId = id;
			
		}

		public final int id() {
			return _buttonId;
		}
		
		public final String text() { 
			return _buttonText; 
		}
		
	} 
	
	public static enum TaskSortFilter {
		PID_DESC ("pid_desc"), 
		PID_ASC ("pid_asc"), 
		ENDING_TIME ("ending_t"), 
		RESEARCH ("research"),
		COMPLETE ("complete"),
		ACTIVE_VIRII ("act_virii"),
		FILE_XFER ("file_tr");

		private final String typeVal;

		private TaskSortFilter(String _val) { 
			typeVal = _val; 
		}

		public final String code() { 
			return typeVal; 
		}
	} 
	
	/***
	 * <p>Filter used to specify types of server IP's to return</p>
	 * <b>Types</b>
	 * <table><tr><td><ul><li>All Servers</li>
	 * <li>Public</li><li>Secret</li>
	 * <li>Owned</li><li>Unlisted</li><li>Group</li></ul></td>
	 * <td><ul><li>Private</li><li>Faction</li><li>Admin</li>
	 * <li>NonAdmin</li><li>Rival Group</li>
	 * </ul></td></tr></table>
	 * 
	 * @author siegleda
	 *
	 */
	public static enum IPDatabaseFilter {
		ALL (""),
		PUBLIC ("pub"),
		PRIVATE ("priv"),
		SECRET ("sec"),
		FACTION ("faction"),
		OWNED ("owned"),
		ADMIN ("admin"),
		UNLISTED ("unlisted"),
		NONADMIN ("non_admin"),
		GROUP ("group"),
		RIVALGROUP ("en_group");
		
		private final String _val;
		
		private IPDatabaseFilter(String value) {
			_val = value;
		}
		
		public final String code() {
			return _val;
		}
	}
}
